﻿Imports DTO
Imports BUS
Imports System.Linq
Imports DAO

Public Class DanhSachHS

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Close()

    End Sub

    Private Sub cbx_khoi_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbx_khoi.SelectedIndexChanged
        Dim temp As Integer
        Dim k As KhoiDTO = cbx_khoi.SelectedValue
        temp = k.MaKhoi

        Dim lop As LopBUS = New LopBUS()
        cbx_lop.DisplayMember = "TenLop"
        cbx_lop.ValueMember = "MaL"

        cbx_lop.DataSource = lop.getClass_BUS(temp)

        Dim st As HocSinhBUS = New HocSinhBUS()

        dgv_listst.DataSource = st.getStudent_BUS(temp)
        Dim stt As Integer = 0
        For Each row As DataGridViewRow In dgv_listst.Rows
            row.Cells(0).Value = stt + 1
            stt = stt + 1
        Next



    End Sub

    Private Sub groupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles groupBox1.Enter

    End Sub

    Private Sub lvDSLopHoc_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub DanhSachHS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim khoi As KhoiBUS = New KhoiBUS()
        cbx_khoi.DisplayMember = "TenKhoi"
        cbx_khoi.ValueMember = "MaK"

        cbx_khoi.DataSource = khoi.getKhoi_BUS()

        Dim temp As Integer
        Dim k As KhoiDTO = cbx_khoi.SelectedValue
        temp = k.MaKhoi

        Dim HocKy As HocKyBUS = New HocKyBUS()
        cbx_NamHoc.DisplayMember = "NamHoc"
        cbx_NamHoc.ValueMember = "MaHK"

        cbx_NamHoc.DataSource = HocKy.getHocKy_BUS()

        Dim tem As Integer
        Dim h As HocKyDTO = cbx_NamHoc.SelectedValue
        tem = k.MaHK




    End Sub

    Private Sub cbx_NamHoc_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbx_NamHoc.SelectedIndexChanged

    End Sub

   

    Private Sub dgv_listst_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv_listst.CellContentClick

    End Sub
End Class